
<div class="form-group col-sm-12 btns">
    {!! Form::submit('保存', ['class' => 'btn btn-primary']) !!}
    <a href="{!! route('articles.index') !!}" class="btn btn-default">取消</a>
</div>

<!-- Category Id Field -->
<div class="form-group col-sm-12">
    {!! Form::label('new_development_type_id', '分类:') !!}

    @foreach($cats as $cat)
        {!! Form::radio('new_development_type_id', $cat->id,isset($newDevelopment)?($cat->id==$newDevelopment->new_development_type_id?true:false):false) !!}{{$cat->title}}
    @endforeach
</div>
<!-- Title Field -->
<div class="form-group col-sm-6">
    {!! Form::label('title', '标题:') !!}
    {!! Form::text('title', null, ['class' => 'form-control']) !!}
</div>

<!-- Author Field -->
<div class="form-group col-sm-6">
    {!! Form::label('author', '作者:') !!}
    {!! Form::text('author', null, ['class' => 'form-control']) !!}
</div>

<!-- Pic Field -->
<div class="form-group col-sm-6">
    {!! Form::label('pic', '图片:') !!}
    {!! Form::file('pic') !!}
</div>
<div class="clearfix"></div>

<!-- Read Num Field -->
<div class="form-group col-sm-6">
    {!! Form::label('read_num', '阅读量:') !!}
    {!! Form::text('read_num', isset($newDevelopment)?$newDevelopment->read_num:0, ['class' => 'form-control']) !!}
</div>

<!-- Like Num Field -->
<div class="form-group col-sm-6">
    {!! Form::label('like_num', '点赞数:') !!}
    {!! Form::text('like_num', isset($newDevelopment)?$newDevelopment->like_num:0, ['class' => 'form-control']) !!}
</div>

<!-- Content Field -->
<div class="form-group col-sm-12 col-lg-12">
    {!! Form::label('content', '内容:') !!}
    {!! Form::textarea('content', null, ['id'=>'container']) !!}
</div>

<!-- Submit Field -->

<style>
    #container{
        height: 600px;
    }
    .btns{
        margin-top: 300px;
    }
</style>

@section('scripts')

    @include('vendor.ueditor.assets')

    <script type="text/javascript">
        var ue = UE.getEditor('container');
        ue.ready(function() {
            ue.execCommand('serverparam', '_token', '{{ csrf_token() }}'); // 设置 CSRF token.
        });
    </script>
@endsection